package com.personal.mapper;

import com.personal.pojo.TCoach;
import com.personal.pojo.TCoachExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TCoachMapper {
    int countByExample(TCoachExample example);

    int deleteByExample(TCoachExample example);

    int deleteByPrimaryKey(Integer coachid);

    int insert(TCoach record);

    int insertSelective(TCoach record);

    //查询所有在职coach
    List<TCoach> selectByExample();
    //查询所有离职coach
    List<TCoach> selectByExample2();
    //根据教练id查询教练
    TCoach selectByPrimaryKey(Integer coachid);

    int updateByExampleSelective(@Param("record") TCoach record, @Param("example") TCoachExample example);

    int updateByExample(@Param("record") TCoach record, @Param("example") TCoachExample example);

    //1.编辑个人信息
    int updateByPrimaryKeySelective(TCoach record);

    int updateByPrimaryKey(TCoach record);
    //会员用户对教练进行 多条件查询
    List selectByDireName(@Param("cotype")String cotype,@Param("coachname")String coachname);
    //1.教练登录（将登录信息放到session中，在个人中心展示）
    TCoach selectByNamePass(@Param("logname")String logname,@Param("password")String password);
    //2.个人中心，个人信息展示，已经放在session中
    //2.0编辑，调用updateByPrimaryKeySelective
    //2.1个人课程表（有待考虑）
    //2.2名下学员统计浏览
    List countMember(Integer coachId);
    //2.3负责课程统计浏览，课程表就行,展示课程表
    List countCourse(Integer coachId);
    //3.课程模块：课程信息查询与浏览，别人的课程表
    List selectCourse();
    //4.教室模块：教室信息查询与预定
    List sellectClassroom();

    //批量删除,暂时删除
    int delBatch(@Param("memids")Integer[] memids);
    //批量删除,彻底删除
    int delBatch2(@Param("memids")Integer[] memids);
}